package net.seabookchen.pojo;

import java.util.Date;

import javax.persistence.Id;

import net.seabookchen.util.DateUtils;

public class Wish {
	private @Id Long id;
	private String wish;
	private Date created;
	
	public Wish(){}
	
	public Wish(String wish) {
		this.wish = wish;
		this.created = new Date();
	}
	
	public Long getId() {
		return id;
	}
	
	public void setId(Long id) {
		this.id = id;
	}
	
	public String getWish() {
		return wish;
	}
	
	public void setWish(String wish) {
		this.wish = wish;
	}
	
	public Date getCreated() {
		return created;
	}
	
	public void setCreated(Date created) {
		this.created = created;
	}
	
	public String getTime() {
		return DateUtils.formatDate(this.created);
	}

	@Override
	public String toString() {
		return "Wish [id=" + id + ", wish=" + wish + ", created=" + getTime()
				+ "]";
	}
	
}
